load(file="Fig_A4.Rdata")


print("This is the Bayes Factor Selection - Chooses Model 1")

print(BF)


trans<-list()

p<-runif(10,0,1)



for(i in 1:10){
  
trans[[i]]<-matrix(NA,2,2)  
  
trans[[i]][1,1]<-p[i]
trans[[i]][1,2]<-1-p[i]
trans[[i]][2,1]<-0
trans[[i]][2,2]<-1
  
}



Bs<-rnorm(10,log(mean(data_q$logArea)),sd(data_q$logArea))

   
   
   
   
probs<-attributes(out1)[13]



pdf(file="Figure_A4.pdf")

plot(years,num[2:139],type="l",ylab="Number of States", xlab="Time")

par(new=T)

plot(years,probs[[1]][2:139,1],lty=2,axes=FALSE,ylim=c(0,1),type="l",ylab="",xlab="")

par(new=T)

plot(years,probs[[1]][2:139,2],lty=3,axes=FALSE,ylim=c(0,1),type="l",ylab="",xlab="")

axis(4,at=c(0,1),cex=.5)
mtext("P(S = k| Y)", 4, line=1)




p<-runif(10,0,1)



for(i in 1:10){
  
  trans[[i]]<-matrix(NA,2,2)  
  
  trans[[i]][1,1]<-p[i]
  trans[[i]][1,2]<-1-p[i]
  trans[[i]][2,1]<-0
  trans[[i]][2,2]<-1
  
}


dev.off()